import axios from "axios";

const baseUrl = 'http://localhost:3001/api/news/';
export default {
    all(page, page_size) {
        return axios.get(baseUrl, {page, page_size})
    },
    get(id) {
        return axios.get(baseUrl + id)
    },
    delete(id) {
        return axios.delete(baseUrl + id)
    },
    save(news) {
        return axios.post(baseUrl, news)
    }
}